package com.atguigu.springbootdemo.service.impl;

import com.atguigu.springbootdemo.bean.Customer;
import com.atguigu.springbootdemo.mapper.CustomerMapper;
import com.atguigu.springbootdemo.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CustomerServiceImpl implements CustomerService {

    @Autowired
    CustomerMapper customerMapper;

    @Override
    public Customer getCustomerById(Integer id) {
        return Customer.builder()
                .id(id)
                .name("zhangsan")
                .age(22)
                .build();
    }

    /*@Override
    public Customer getCustomerById(Integer id) {
        return customerMapper.getCustomerById(21L);
    }
*/

}
